Skip to main content

Overview

Once you complete checkout, orders are created in the system with tracking information. This guide explains how to view and manage your orders.

Understanding Orders

Each order in Iquea Commerce contains:
  • Order ID (pedido_id): Unique numeric identifier
  • Reference Code (referencia): Human-readable order reference
  • Creation Date (fecha_creacion): When the order was placed
  • Status (estado): Current order state
  • Total (total): Total order amount in euros
  • Order Details (detalles): Line items with products and quantities

Order Statuses

Orders progress through different states:

PENDIENTE

Pending - Order created but not yet confirmedThis is the initial state when an order is placed. Payment may be processing.

CONFIRMADO

Confirmed - Order confirmed and acceptedPayment received, order is being prepared for shipment.

ENVIADO

Shipped - Order has been dispatchedItems are in transit to the delivery address.

ENTREGADO

Delivered - Order successfully deliveredCustomer has received the items. Order complete.

CANCELADO

Cancelled - Order cancelledOrder was cancelled by customer or admin. No delivery will occur.

Viewing Order History

Access your complete order history through the orders page:
1

Navigate to Orders

Click “Orders” or “Pedidos” in the main navigation menu
2

View Order List

All your orders are displayed in a list or table format showing:
  • Order reference code
  • Creation date
  • Current status
  • Total amount
3

Filter by Status

You can filter orders by status if the interface provides status filters

Order List Information

Each order in the list displays key information at a glance:
FieldDescriptionExample
ReferenciaUnique order referenceORD-2025-12345
FechaOrder creation date2025-03-11
EstadoCurrent statusCONFIRMADO
TotalOrder total amount1,299.00 €

Viewing Order Details

Click on any order to view comprehensive details:
1

Select Order

Click on an order reference code from your order list
2

View Order Header

See order metadata:
  • Full reference code
  • Exact creation timestamp
  • Current status with visual indicator
  • Total amount
3

Review Order Items

Each line item shows:
  • Product name
  • Product image thumbnail
  • Unit price
  • Quantity ordered
  • Line subtotal (price × quantity)
4

Verify Order Total

The sum of all line subtotals equals the order total

Order Detail Components

Order Details Structure

Each order contains multiple detail items (DetallePedido):
interface DetallePedido {
  detalle_id: number;        // Unique detail line ID
  producto: ProductoResumen; // Product summary
  cantidad: number;          // Quantity ordered
  precioUnitario: number;   // Unit price at time of order
  subtotal: number;         // cantidad × precioUnitario
}

Product Summary in Orders

Order details include simplified product information:
  • Product ID: Database identifier
  • Product Name: Name at time of purchase
  • Price: Price when order was placed (locked)
  • Image URL: Product thumbnail
Prices in orders reflect the price at the time of purchase, not current prices. This ensures order totals remain accurate even if product prices change.

Tracking Order Status

Status Progression

Orders typically follow this lifecycle:
PENDIENTE → CONFIRMADO → ENVIADO → ENTREGADO
Orders can be cancelled at any point:
Any Status → CANCELADO

Checking Order Status

1

Open Order Details

Navigate to the specific order you want to track
2

View Status Badge

The current status is prominently displayed, often with color coding:
  • PENDIENTE: Yellow/Orange
  • CONFIRMADO: Blue
  • ENVIADO: Purple
  • ENTREGADO: Green
  • CANCELADO: Red
3

Check Last Update

The order creation date shows when it was placed. Status changes may be timestamped if tracked.

API Endpoints for Orders

The order management system uses these backend endpoints:

Available Endpoints

EndpointMethodDescription
/api/pedidosGETList all orders (admin or user’s orders)
/api/pedidos/{id}GETGet specific order by ID
/api/pedidos/estado/{estado}GETFilter orders by status
/api/pedidosPOSTCreate new order
/api/pedidos/{id}PUTUpdate order (admin)
/api/pedidos/{id}DELETEDelete order (admin)

Order Detail Endpoints

EndpointMethodDescription
/api/pedidos/{id}/detallesGETGet all details for an order
/api/pedidos/{id}/detallesPOSTAdd item to order
/api/detalles/{id}DELETERemove order line item
/api/detalles/{id}/cantidadPUTUpdate quantity of line item
Some endpoints are admin-only. Regular users can only view their own orders.

Order Reference Codes

Each order has a unique referencia field:
  • Used for customer communication
  • Easier to reference than numeric IDs
  • Follows a consistent format
  • Can be used for order lookup

Reference Format

While the exact format depends on backend implementation, references typically include:
  • Prefix (e.g., “ORD” or “PED”)
  • Year or date component
  • Sequential or random number
Example: ORD-2025-12345

Creating Orders

Orders are typically created through the checkout process, but can also be created via API:
1

Complete Cart Checkout

The standard checkout flow creates an order automatically
2

Order Creation Request

Backend receives POST to /api/pedidos with:
{
  "usuario_id": 123
}
3

Order Details Added

Cart items are converted to order details:
  • Each cart item becomes a DetallePedido
  • Prices are locked at current values
  • Stock is decremented (if tracked)
4

Order Confirmation

Order is created with:
  • Status: PENDIENTE
  • Reference code generated
  • Total calculated from details
  • Creation timestamp set

Order Calculations

Line Item Subtotal

Each order detail calculates its subtotal:
subtotal = precioUnitario × cantidad

Order Total

The order total is the sum of all detail subtotals:
total = sum of all detalle.subtotal
Order totals are calculated server-side. Client-side cart totals may differ if prices change between cart view and checkout.

User Permissions

Customer Access

Regular users (role: CLIENTE) can:
  • View their own orders
  • View order details for their orders
  • Create new orders through checkout

What Customers Cannot Do

  • View other users’ orders
  • Update order status
  • Delete orders
  • Modify order details after creation
If you need to modify an order, contact support or an administrator. Once placed, orders cannot be self-edited.

Best Practices

Save Reference Codes

Keep a record of your order reference codes for easy tracking and customer support inquiries.

Check Order Status Regularly

Monitor your order status to know when to expect delivery and confirm successful shipment.

Review Order Details

Always review order details immediately after placement to ensure accuracy.

Report Issues Promptly

If an order status doesn’t update as expected, contact support with your reference code.

Troubleshooting

Cannot Find Order

Problem: Order not appearing in order list Solutions:
  • Verify you’re logged in with the correct account
  • Check if order was successfully created (look for confirmation)
  • Contact support with approximate order date

Order Stuck in PENDIENTE

Problem: Order status not progressing Solutions:
  • Allow time for payment processing
  • Check payment method was successful
  • Contact support if pending for more than 24 hours

Incorrect Order Total

Problem: Order total doesn’t match cart total Explanation: Prices may have changed between viewing cart and completing checkout. Order total reflects prices at checkout time.